import request from "../../http";

const serverApi = {
  // 获取收藏服务
  async getCollectData(query) {
    return request({
      url: "/pc/server/link/list",
      method: "get",
      params: query
    });
  },
  // 获取服务详情
  async getServerDetail(id) {
    return request({
      url: `/pc/server/${id}`,
      method: "get"
    });
  },
  // 获取服务列表
  async getServerList(query) {
    return request({
      url: "/pc/server/list",
      method: "get",
      params:query
    });
  },
  // 收藏服务
  async collectServer(params,method){
    return request({
      url: "/api/serverLink",
      method:method||"post",
      data:params
    });
  },
  // 获取供应商店铺信息
  async getSupplierInfo(userId){
    return request({
      url:`/pc/supplier/${userId}`,
      method:'get'
    })
  }
};

export default serverApi;
